{% extends "base.html" %}

{% block title %}Create an account{% endblock %}

{% block content %}
      <h1>Sign Up</h1>
      <form method="post">
		
        {% if form.error_dict %}
          <p class="error">Please correct the errors below.</p>
        {% endif %}

        {% if form.username.errors %}
          {{ form.username.html_error_list }}
        {% endif %}
        <label for="id_username">Username:</label> {{ form.username }}

        {% if form.email.errors %}
          {{ form.email.html_error_list }}
        {% endif %}
        <label for="id_email">Email:</label> {{ form.email }}
		
        {% if form.password1.errors %}
          {{ form.password1.html_error_list }}
        {% endif %}
        <label for="id_password1">Password:</label> {{ form.password1 }}

        {% if form.password2.errors %}
          {{ form.password2.html_error_list }}
        {% endif %}
        <label for="id_password2">Password (again):</label> {{ form.password2 }}

        <input type="submit" value="Create the account" />
		{% csrf_token %}
      </label>
{% endblock %}